import request from '@/utils/request'

// 商品组分页
export function pageGoodsGroup(query) {
  return request({
    url: '/goods/projectGoodsGroup/paging',
    method: 'get',
    params: query
  })
}

// 商品组列表
export function listGoodsGroup(query) {
  return request({
    url: '/goods/projectGoodsGroup/list',
    method: 'get',
    params: query
  })
}

// 商品组授权分页
export function pageAuthorize(query) {
  return request({
    url: '/goods/projectGoodsGroup/pageAuthorize',
    method: 'get',
    params: query
  })
}

// 获取商品组未授权店铺分页
export function pagingEnterpriseShop(query) {
  return request({
    url: '/goods/projectGoodsGroup/pagingEnterpriseShop',
    method: 'get',
    params: query
  })
}

// 获取商品组
export function getGoodsGroup(query) {
  return request({
    url: '/goods/projectGoodsGroup/get',
    method: 'get',
    params: query
  })
}

// 保存商品组
export function saveGoodsGroup(data) {
  return request({
    url: '/goods/projectGoodsGroup/save',
    method: 'post',
    data: data
  })
}

// 保存商品组商品
export function saveGoodsGroupDetail(data) {
  return request({
    url: '/goods/projectGoodsGroup/saveDetail',
    method: 'post',
    data: data
  })
}

// 保存商品组授权
export function saveGoodsGroupAuthorize(data) {
  return request({
    url: '/goods/projectGoodsGroup/saveAuthorize',
    method: 'post',
    data: data
  })
}

// 删除商品组
export function deleteGroup(data) {
  return request({
    url: '/goods/projectGoodsGroup/delete',
    method: 'post',
    data: data
  })
}

// 删除商品组授权
export function deleteAuthorize(data) {
  return request({
    url: '/goods/projectGoodsGroup/deleteAuthorize',
    method: 'post',
    data: data
  })
}

// 获取下拉框筛选商品组列表 只查询id和名称
export function getSelGoodsGroupList(params) {
  return request({
    url: '/goods/projectGoodsGroup/getSelGoodsGroupList',
    method: 'get',
    params: params
  })
}
